package com.xg.feign;

import com.xg.common.response.UsedCarType;
import com.xg.common.result.ApiResult;
import com.xg.common.util.PageUtil;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

@FeignClient("service-car-provider")
public interface ServiceCarFeignClient {

    @RequestMapping("/usedCarType/list")
    @ResponseBody
    PageUtil<UsedCarType> queryPage(@RequestParam Map<String,Object> params);

    @RequestMapping("/usedCarType/queryUsedCarTypeList")
    @ResponseBody
    ApiResult<List<UsedCarType>> queryUsedTypeList();

    @RequestMapping("/usedCarType/delete")
    @ResponseBody
    ApiResult deleteType(@RequestParam("ids") List<Integer> ids);

    @RequestMapping("/usedCarType/info")
    @ResponseBody
    ApiResult<UsedCarType> selectTypeInfo(@RequestParam("typeId") Integer typeId);

    @RequestMapping("/usedCarType/save")
    @ResponseBody
    ApiResult saveType(@RequestBody UsedCarType usedCarType);
}
